<html>
<head><meta charset="utf-8"><title>Can the rustc tests be more parallel? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Can.20the.20rustc.20tests.20be.20more.20parallel.3F.html">Can the rustc tests be more parallel?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="167172844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Can%20the%20rustc%20tests%20be%20more%20parallel%3F/near/167172844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edd Barrett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Can.20the.20rustc.20tests.20be.20more.20parallel.3F.html#167172844">(Jun 03 2019 at 09:53)</a>:</h4>
<p>Hi,</p>
<p>We just got a new machine for building/testing a fork of rust. The machine has loads of cores.</p>
<p>I was watching htop while <code>x.py test</code> was running and noticed that whilst some suites are highly parallel (e.g. rustdoc), others are not.</p>
<p>Is there any reason the tests cannot be more parallel?</p>
<p>Thanks!</p>



<a name="167174099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Can%20the%20rustc%20tests%20be%20more%20parallel%3F/near/167174099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Can.20the.20rustc.20tests.20be.20more.20parallel.3F.html#167174099">(Jun 03 2019 at 10:12)</a>:</h4>
<p>isn't there a flag you pass to increase the number of jobs used for tests?</p>



<a name="167174133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Can%20the%20rustc%20tests%20be%20more%20parallel%3F/near/167174133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Can.20the.20rustc.20tests.20be.20more.20parallel.3F.html#167174133">(Jun 03 2019 at 10:13)</a>:</h4>
<p>/me looks</p>



<a name="167174323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Can%20the%20rustc%20tests%20be%20more%20parallel%3F/near/167174323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Can.20the.20rustc.20tests.20be.20more.20parallel.3F.html#167174323">(Jun 03 2019 at 10:16)</a>:</h4>
<p>yeah, its in the <code>x.py test --help</code> output:</p>
<div class="codehilite"><pre><span></span>...
    -j, --jobs JOBS     number of jobs to run in parallel
...
</pre></div>


<p>would that resolve your issue?</p>



<a name="167174526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Can%20the%20rustc%20tests%20be%20more%20parallel%3F/near/167174526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Can.20the.20rustc.20tests.20be.20more.20parallel.3F.html#167174526">(Jun 03 2019 at 10:18)</a>:</h4>
<p>there is also a <code>RUST_TEST_THREADS</code> environment variable that I believe tells <code>compiletest</code> to run the tests on multiple threads ; you may need to use a combination of these two things to get the best utilization of a machine with many cores.</p>



<a name="167174566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Can%20the%20rustc%20tests%20be%20more%20parallel%3F/near/167174566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Can.20the.20rustc.20tests.20be.20more.20parallel.3F.html#167174566">(Jun 03 2019 at 10:19)</a>:</h4>
<p>(oh, but I think we already set that by default to the value sent in for <code>--jobs</code>, so the latter bit is probably unneccesary)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>